/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author allankv
 */
@Entity
@Table(name = "acceptednameusage")
@NamedQueries({
    @NamedQuery(name = "Acceptednameusage.findAll", query = "SELECT a FROM Acceptednameusage a"),
    @NamedQuery(name = "Acceptednameusage.findByIdacceptednameusage", query = "SELECT a FROM Acceptednameusage a WHERE a.idacceptednameusage = :idacceptednameusage"),
    @NamedQuery(name = "Acceptednameusage.findByAcceptednameusage", query = "SELECT a FROM Acceptednameusage a WHERE a.acceptednameusage = :acceptednameusage")})
public class Acceptednameusage implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idacceptednameusage")
    private Integer idacceptednameusage;
    @Column(name = "acceptednameusage")
    private String acceptednameusage;
    @OneToMany(mappedBy = "acceptednameusage", fetch = FetchType.LAZY)
    private List<Taxonomicelement> taxonomicelementList;

    public Acceptednameusage() {
    }

    public Acceptednameusage(Integer idacceptednameusage) {
        this.idacceptednameusage = idacceptednameusage;
    }

    public Acceptednameusage(Integer idacceptednameusage, String acceptednameusage) {
        this.idacceptednameusage = idacceptednameusage;
        this.acceptednameusage = acceptednameusage;
    }

    public Integer getIdacceptednameusage() {
        return idacceptednameusage;
    }

    public void setIdacceptednameusage(Integer idacceptednameusage) {
        this.idacceptednameusage = idacceptednameusage;
    }

    public String getAcceptednameusage() {
        return acceptednameusage;
    }

    public void setAcceptednameusage(String acceptednameusage) {
        this.acceptednameusage = acceptednameusage;
    }

    public List<Taxonomicelement> getTaxonomicelementList() {
        return taxonomicelementList;
    }

    public void setTaxonomicelementList(List<Taxonomicelement> taxonomicelementList) {
        this.taxonomicelementList = taxonomicelementList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idacceptednameusage != null ? idacceptednameusage.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Acceptednameusage)) {
            return false;
        }
        Acceptednameusage other = (Acceptednameusage) object;
        if ((this.idacceptednameusage == null && other.idacceptednameusage != null) || (this.idacceptednameusage != null && !this.idacceptednameusage.equals(other.idacceptednameusage))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Acceptednameusage[idacceptednameusage=" + idacceptednameusage + "]";
    }

}
